<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'north'" class="center">
        <div class="webmap">
            <p class="webmaptip">当前位置:</p>
            <a href="javascript:;" class="easyui-link" data-options="plain:true">财务管理</a>
            <p class="webmaptip">></p>
            <a href="javascript:;" class="easyui-link" data-options="plain:true">资金管理</a>
            <p class="webmaptip">></p>
            <a href="javascript:;" class="easyui-link" data-options="plain:true">充值记录</a>
        </div>
        <div class="querybycon">
            <form id="query">
                <div class="queryinfo">
                    <div>交易单号<input type="text" name="tradeNo"></div>
                    <div>用户名<input type="text" name="user.name"></div>
                    <div>状态<input type="text" name="user.telephone"></div>
                    <div>充值时间<input name="applyStartTime" class="easyui-date">-<input name="applyEndTime"
                                                                                      class="easyui-date"></div>
                    <div>到账时间<input name="finishStartTime" class="easyui-date">-<input name="finishEndTime"
                                                                                       class="easyui-date"></div>
                </div>
            </form>
        </div>
        <div class="querybtn">
            <a id="querybtn" href="javascript:;" class="easyui-linkbutton info"
               data-options="iconCls:'fa fa-search'">查询</a>
            <a id="exportbtn" href="javascript:;" class="easyui-linkbutton "
               data-options="iconCls:'fa fa-search'">导出</a>
            <div style="visibility: hidden;">aa</div>
        </div>
    </div>
    <div data-options="region:'center'" class="center">

        <table id="list"></table>
    </div>
</div>
<script type="text/javascript">
    /*var addUrl = "page/menu/menueadd.html";
     var editUrl = "/menu/menuedit.html";
     var delUrl = '/menu/del';
     var save = '/menu/save';*/
    var listUrl = "/record/list";
    var columns = [[{
        field: 'id',
        title: 'id'
    }, {
        field: 'tradeNo',
        title: '交易单号'
    }, {
        field: 'user',
        title: '用户名',
        formatter: function (value) {
            if (value != null) {
                return value.telephone;
            }
        }
    }, {
        field: 'user',
        title: '姓名',
        formatter: function (value) {
            if (value != null) {
                return value.name;
            }
        }
    }, {
        field: 'rechargeAmount',
        title: '充值金额',
    }, {
        field: 'serviceFee',
        title: '手续费',
    }, {
        field: 'factAmount',
        title: '到账金额',
    }, {
        field: 'feePayer',
        title: '手续费支付方',
        formatter: function (value) {
            return dic["rechargeType"][value.toString()];
        }
    }, {
        field: 'rechargeSource',
        title: '充值方式',
        formatter: function (value) {
            return dic["rechargeType"][value.toString()];
        }
    }, {
        field: 'applyTime',
        title: '充值时间',
    }, {
        field: 'finishTime',
        title: '到账时间',
    }, {
        field: 'state',
        title: '状态',
        formatter: function (value) {
            return dic["rechargeType"][value.toString()];
        }

    }]];
    list.init({url: listUrl, columns: columns});

    $("#exportbtn").click(function () {
        var obj = $("#query").serializeObject();
        window.open(exportUrl + "?" + $(obj).formatJson2Url());
    });
</script>
